package com.baizhi.listx;

import java.util.Arrays;
import java.util.List;

public class ArrayToList {
    public static void main(String[] args) {
        String[] arr = {"张三","李四","王五","赵六"};
        System.out.println("数组："+ Arrays.toString(arr));


        //将数组转换成集合
        List<String> names = Arrays.asList(arr);
        System.out.println(names);

        names.set(0,"张核子");

        System.out.println(names);


    }
}
